﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Tree_Folding.aspx.cs" Inherits="BaseWeb.Tree_Folding"
    Theme="主题1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        html, body
        {
            margin: 0;
            padding: 0;
        }
    </style>
    <style type="text/css">
        .url
        {
            margin: 2px;
            padding: 2px;
            text-align: center;
            border: solid 1px #e5eecc;
        }
        .btn
        {
            cursor: pointer;
            margin: 2px;
            padding: 2px;
            text-align: center;
            border: solid 1px green;
            background: #D5E5F3;
        }
        .menu
        {
            cursor: pointer;
            margin: 2px;
            padding: 2px;
            text-align: center;
            font-weight: bold;
            font-family: @幼圆;
            border: solid 1px green;
            background: #41B5FB;
        }
        .panel
        {
            cursor: default;
            display: none;
        }
    </style>

    <script src="Script/jquery.js" type="text/javascript"></script>

    <script type="text/javascript">

        $(document).ready(function()
        {
            //主按钮活动事件
            var selMainId = "";
            $("div[id^='MainDiv_']").click(function()
            {
                var id = $(this).attr("id").replace("MainDiv_", "MainPenelDiv_");
                $("div:visible[id^='MainPenelDiv_']").slideUp("fast"); //关闭其他,注释掉就不关闭其他的了
                $("div:visible[id^='PenelDiv_']").slideUp("fast");
                if (selMainId != id)
                {
                    $("#" + id).slideToggle("fast"); //折叠该项
                    selMainId = id;
                }
                else
                {
                    selMainId = "";
                }
            });

            //子按钮活动事件
            var selBtnId = "";
            $("div[id^='Div_btn_']").click(function()
            {
                var id = $(this).attr("id").replace("Div_btn_", "PenelDiv_");
                $("div:visible[id^='PenelDiv_']").slideUp("fast"); //关闭其他,注释掉就不关闭其他的了
                if (selBtnId != id)
                {
                    $("#" + id).slideToggle("fast"); //折叠该项
                    selBtnId = id;
                }
                else
                {
                    selBtnId = "";
                }
            });

            //鼠标点击、移入、移出事件（变色）
            var selUrlId = "";
            $("div[id^='Div_url_']").click(function()
            {
                $("div[id^='Div_url_']").css("background", "");
                $(this).css("background", "#e5eecc");
                selUrlId = $(this).attr("id");
            }).mouseover(function()
            {
                $(this).css("background", "#e5eecc");
            }).mouseout(function()
            {
                if (selUrlId != $(this).attr("id"))
                {
                    $(this).css("background", "");
                }
            });

        }); 
        
        
        
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div id="divBody" runat="server" class="url">
    </div>
    </form>
</body>
</html>
